{% load elems %}
<div class="task_card task_card_priority{{ task.priority.order }}">
    <table>
        <tr valign="top">
            <td style="width:4.8em; padding-right:.3em">
                <div class="head">
			        <span class="number">
			            {{ task.number }}
			        </span>
		        </div>
                {% if not task.priority.is_default %}
                    <div class="priority">
                        {{ task.priority }}
                    </div>
                {% endif %}            			        
		        {% if not task.category.is_default %}
	                <div class="category">
	                    {{ task.category }}
	                </div>
                {% endif %}            			        
            </td>
            <td>
                <div class="head">			    
			        <a href="{% url task_list project_id=task.project.id %}" class="project">{{ task.project }}</a>
			        <span class="arrow">→</span>
			        <a href="{% url task_details task.id %}" class="task">{{ task.name }}</a>
			    </div>
			    <div class="creation_time">
			        <strong>Дата:</strong> {{ task.creation_datetime|format_datetime }}
			    </div>              
			    {% if task.is_closed %}
			        <div class="stop_time">
			            <strong>Закрыта:</strong> 
			            {{ task.close_datetime|format_datetime }},
			        </div>
			    {% endif %}
			    <div class="author">
			        <strong>Автор:</strong> 
			        <a href="{% url task_list task.author.id %}" class="user">{{ task.author }}</a>
			    </div>
			    <div class="executor">
                    {% if task.executor %}
				        <strong>Исполнитель:</strong>
				        <a href="{% url task_list task.executor.id %}" class="user">{{ task.executor }}</a>
                    {% else %}
                        <input type="button" value="Взять себе"/>
                    {% endif %}                    
			    </div>
            </td>
        </tr>
    </table>

</div>